use super::IntrManager;
use loongArch64::register::crmd;
use crate::WARN;

impl IntrManager {
    /// 启用全局中断（LoongArch64实现）
    #[inline]
    pub fn intr_enable() {
        unsafe {
            // 设置CRMD.IE位为1启用中断
            crmd::set_ie(true);
        }
    }

    /// 禁用全局中断（LoongArch64实现）
    #[inline]
    pub fn intr_disable() {
        unsafe {
            // 清除CRMD.IE位为0禁用中断
            crmd::set_ie(false);
        }
    }
}